home *** CD-ROM | disk | FTP | other *** search
/ CDV Software Presents (USA) / CDV Software Presents (USA).bin / demo / bk_demo.exe / DATA.PAK / ui / minimap.lua < prev    next >
Encoding:
Text File  |  2002-12-23  |  2.7 KB  |  88 lines

  1. function LuaProcessMessage( nMessageCode, nFirst, nSecond )
  2.  
  3.     local nTemp = ProcessMessageWithLink( nMessageCode, nFirst );
  4.     if ( nTemp ~= 0 ) then
  5.         return 1
  6.     end
  7.  
  8.  
  9.     if ( nMessageCode == 536936448 and nFirst == 12000 ) then --ESCAPE MENU
  10.         local nMessage = SetProcessedFlag( 2097248 )
  11.         AddMessage( nMessage, 0, 0 )
  12.         return 1
  13.     end
  14.  
  15.     if ( nMessageCode == 536936448 and nFirst == 12001 ) then --LAST OBJECTIVE
  16.         local nMessage = SetProcessedFlag( 2097266 )
  17.         AddMessage( nMessage, 1, 1 )
  18.         return 1
  19.     end
  20.  
  21.     if ( nMessageCode == 536936448 and nFirst == 12003 ) then --CALL AVIATION
  22. --        OutputValue( "Process aviation", nFirst )
  23.         local bProcess = IsGameButtonProcessing();
  24.         if ( bProcess ~= 0 ) then
  25.             --send message to show aviation buttons
  26.             local nNewMessageCode = SetProcessedFlag( 524 )
  27.             AddMessage( nNewMessageCode, 0, 0 )
  28.         end
  29.         return 1
  30.     end
  31.  
  32.     if ( nMessageCode == 215 ) then        --DISABLE AVIATION
  33. --        OutputValue( "Disable aviation", nFirst )
  34.         AddMessage( 65600, 12003, nFirst )    --SET ANIMATION TIME
  35.         AddMessage( 65808, 12003, 0 )    -- disable color filler
  36.         local nMessage = SetProcessedFlag( nMessageCode )
  37.         AddMessage( nMessage, nFirst, nSecond )
  38.         return 1
  39.     end
  40.  
  41.     if ( nMessageCode == 216 ) then        --ENABLE AVIATION
  42. --        OutputValue( "Enable aviation", 1 )
  43.         AddMessage( 65568, 12003, 1 )    --ENABLE WINDOW
  44.         AddMessage( 65792, 12003, 0 )    --enable color filler
  45.         local nMessage = SetProcessedFlag( nMessageCode )
  46.         AddMessage( nMessage, nFirst, nSecond )
  47.         return 1
  48.     end
  49.  
  50.     if ( nMessageCode == 536936448 and nFirst == 12002 ) then --SET MARKER
  51.         OutputValue( "Set marker notify clicked", nSecond )
  52.         if ( nSecond == 1 ) then
  53.             local nMessage = SetProcessedFlag( 59 )            --USER_ACTION_PLACE_MARKER
  54.             AddMessage( nMessage, 0, 0 )
  55.         else
  56.             local nMessage = SetProcessedFlag( 256 + 59 )    --USER_ACTION_PLACE_MARKER clear
  57.             AddMessage( nMessage, 0, 0 )
  58.         end
  59.         return 1
  60.     end
  61.  
  62.     if ( nMessageCode == 256 + 59 ) then --SET MARKER clear state
  63.         OutputValue( "Set marker external clear", 1 )
  64.         AddMessage( 65536, 12002, 0 )    --CHANGE_STATE to 0 (clear state)
  65.         return 1
  66.     end
  67.  
  68. --    if ( nMessageCode == 536936448 and nFirst == 12003 ) then --SWITCH FORMATION
  69. --        local nMessage = SetProcessedFlag( 2097266 )
  70. --        AddMessage( nMessage, 1, 1 )
  71. --        return 1
  72. --    end
  73.  
  74. --    if ( nMessageCode == 536936448 and nFirst == 12002 ) then --PAUSE GAME
  75. --        local nMessage = SetProcessedFlag( 1048592 )
  76. --        AddMessage( nMessage, 1, 1 )        --PAUSE_GAME
  77. --        return 1
  78. --    end
  79.  
  80. --    if ( nMessageCode == 536936448 and nFirst == 12003 ) then --CALL STAFF
  81. --        local nMessage = SetProcessedFlag( 110 )
  82. --        AddMessage( nMessage, 1, 1 )
  83. --        return 1
  84. --    end
  85.  
  86.     return 0
  87. end
  88.